package com.woniu.microcommunityserver.activity.service.impl;

import com.woniu.microcommunityserver.activity.entity.ActivityManagementInfoEntity;
import com.woniu.microcommunityserver.activity.mapper.ActivityManagementInfoMapper;
import com.woniu.microcommunityserver.activity.service.ActivityManagementInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class ActivityManagementInfoServiceImpl implements ActivityManagementInfoService {
    @Resource
    private ActivityManagementInfoMapper activityManagementInfoMapper;

    @Override
    public List<ActivityManagementInfoEntity> findAllActivity() {
        List<ActivityManagementInfoEntity> activities = activityManagementInfoMapper.findAllActivity();
        return activities;
    }

    @Override
    public List<ActivityManagementInfoEntity> findByAny(Map<String,Object> map) {
        List<ActivityManagementInfoEntity> activity = activityManagementInfoMapper.findByAny(map);
        return activity;
    }

    @Override
    public boolean deleteActivity(Integer id) {
        return activityManagementInfoMapper.deleteActivity(id);
    }

    @Override
    public boolean insertActivity(ActivityManagementInfoEntity activityManagementInfoEntity) {
        return activityManagementInfoMapper.insertActivity(activityManagementInfoEntity);
    }

    @Override
    public boolean updateActivity(ActivityManagementInfoEntity activityManagementInfoEntity) {
        return activityManagementInfoMapper.updateActivity(activityManagementInfoEntity);
    }
}
